#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
using pii = pair<int, int>;
using ll = long long;
const int N = 2010, M = N * N;
int n, m;
struct Edge
{
    int a, b;
    ll w;
    bool operator<(const Edge& t) const
    {
        return w < t.w;
    }
}edge[M];
ll c[N], k[N];
int p[N], x[N], y[N];
vector<int> station;
vector<pii> wire;
int find(int x)
{
    if (p[x] != x) return p[x] = find(p[x]);
    return p[x];
}
int main()
{
    int n;
    cin >> n;
    for (int i = 1; i <= n; i++)
    {
        cin >> x[i] >> y[i];
    }
    for (int i = 1; i <= n; i++)
    {
        cin >> c[i];
    }
    for (int i = 1; i <= n; i++)
    {
        cin >> k[i];
    }
    for (int i = 1; i <= n; i++)
    {
        for (int j = i; j <= n; j++)
        {
            if (i == j) edge[m++] = { i,0,c[i] };
            else edge[m++] = { i,j,(ll)(k[i] + k[j]) * (abs(x[i] - x[j]) + abs(y[i] - y[j])) };
        }
    }
    sort(edge, edge + m);
    for (int i = 1; i <= n; i++) p[i] = i;
    ll res = 0;
    for (int i = 0; i < m; i++)
    {
        int a = edge[i].a, b = edge[i].b;
        int pa = find(a), pb = find(b);
        ll w = edge[i].w;
        if (pa != pb)
        {
            if (a == 0 || b == 0) station.push_back(a);
            else wire.push_back({ a,b });
            p[pa] = pb;
            res += w;
        }
    }
    cout << res << endl;
    cout << station.size() << endl;
    for (auto e : station) cout << e << " ";
    cout << endl;
    cout << wire.size() << endl;
    for (auto e : wire) cout << e.first << " " << e.second << endl;
    return 0;
}